<?php if (!defined('THINK_PATH')) exit();?><!doctype html>
<html>
<head>
<meta charset="utf-8">
<script src="/project/youjiu/Public/Js/Jquery-1.8.2.min.js"></script>
<title>游久</title>
<style type="text/css">
body{margin:0; padding:0; font-family:'微软雅黑'; font-size:13px;} input{font-family:'微软雅黑';} 
ul{list-type:none; margin:0; padding:0;}

.menu{width:200px; background-color:#9CC; position:fixed; top:0px; left:0px;}
.menu ul{padding-top:30px; background-color:#369}
.menu li{padding:10px 0px; background-color:#6C9; color:#FFF; border-bottom:#666 1px solid; text-align:center; cursor:pointer;}
.menu li:hover{background-color:#69C}

.cont{float:left; margin-left:200px;}
.cont .title{padding:5px; border-left:#69F 3px solid; margin:15px;}
.cont button{float:right;}

.textA{width:600px; height:25px; margin:0; padding:0 10px; border:#CCC 1px solid;}
.textA:focus{outline:none; border-color:#6CC;}
.textB{width:150px; height:25px; margin:0; padding:0 10px; border:#CCC 1px solid;}
.textB:focus{outline:none; border-color:#6CC;}

.buttonA{width:80px; height:30px; background-color:#6CC; color:#FFF; border:0; margin-right:20px; cursor:pointer;}
.buttonA:hover{background-color:#6C9;}

a{text-decoration:none; color:#369; cursor:pointer;} a:hover{color:#6CC;}
</style>

<style type="text/css">
.cont table{margin:20px; border:#CCC 1px solid;}
.cont table td{padding:10px 20px; border-bottom:#CCC 1px solid;}
.cut_solid{background-color:#EEE;}
</style>

</head>

<body>
<div class="menu">
	<ul>
    	<a href="<?php echo U('Youjiu/Left/index');?>"><li>左部菜单</li></a>
        <a href="<?php echo U('Youjiu/Right/index');?>"><li>右部菜单</li></a>
    </ul>
</div>

<div class="cont">
	
	<div class="title">英雄列表
        <button class="buttonA">入库</button>
        <button class="buttonA">预览</button>
    </div>
    
    <hr size="1" align="right" class="cut_solid">
    
    <form class="form_add">
    <table>
    <tr><td>英雄名称</td><td><input type="text" name="hero_name" class="textA"></td></tr>
    <tr><td>英雄图标</td><td><input type="text" name="hero_img" class="textA"></td></tr>
    <tr><td>版块标题</td><td><input type="text" name="hero_title" class="textA"></td></tr>
    <tr><td>英雄链接</td><td><input type="url"	name="hero_url" class="textA"></td></tr>
    <tr><td>英雄价格</td><td><input type="text" name="hero_price" class="textA"></td></tr>
    <tr><td>英雄定位</td><td><input type="text" name="hero_position" class="textA"></td></tr>
    <tr><td>天赋链接</td><td><input type="url" name="url_tianfu" placeholder="天赋加点" class="textA"></td></tr>
    <tr><td>技能链接</td><td><input type="url" name="url_jineng" placeholder="技能加点" class="textA"></td></tr>
    <tr><td>符文链接</td><td><input type="url" name="url_fuwen" placeholder="推荐符文" class="textA"></td></tr>
    <tr><td>皮肤链接</td><td><input type="url" name="url_pifu" placeholder="英雄皮肤" class="textA"></td></tr>
    <tr><td>链接名称</td><td><input type="text" name="link_name" placeholder="多个名称请用空格分开" class="textA"></td></tr>
    <tr><td>链接地址</td><td><input type="text" name="link_url" placeholder="多个连接请用空格分开" class="textA"></td></tr>
    </table>
    </form>

</div>

</body>

<script language="javascript">
function doPreview(){
	var get_data	= $(".form_add").serialize();
	window.open("addHero?ops_type=preview&"+get_data, "_blank");
}

function doInSql(){
	var get_data	= $(".form_add").serialize();
	window.open("addHero?ops_type=save&"+get_data, "_self");
}
</script>

<script language="javascript">
var screenHeight	= $(window).height();
var screenWidth		= $(window).width();
$(".menu").css("height", screenHeight+'px');
$(".cont").css("width", screenWidth-210+'px');
$(".cut_solid").css("width", screenWidth-210+'px');

$("button").click(function(){
	var btn_html	= $(this).html();
	switch(btn_html){
		case "预览":
			doPreview();
		break;
		
		case "入库":
			doInSql();
		break;
		
		case "增加":
			btnAdd();
		break;
		
		case "导出XML":
			outXML();
		break;
	}
});
</script>
</html>